﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace QFramework
{
    public class TestCreatePanle : MonoBehaviour
    {
        void Start()
        {
            ResMgr.Init();

            FUIMgr.OpenPanelAsyn<Basics_Main>()
                  .AsynBack(x => { Debug.Log(x.Transform.name);});


            this.Repeat()
                .Until(() => { return Input.GetKeyDown(KeyCode.A); })
                .Event(() => { FUIMgr.ReleaseAllPack(); })
                .Begin();

            this.Repeat()
                .Until(() => { return Input.GetKeyDown(KeyCode.Space); })
                .Event(() => { FUIMgr.OpenPanel<Basics_Main>(); })
                .Begin();

            this.Repeat()
                .Until(() => { return Input.GetKeyDown(KeyCode.S); })
                .Event(() => { FUIMgr.ClosePanle<Basics_Main>(); })
                .Begin();

        }

    }
}
